<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: elftosb::Keyblob Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classelftosb_1_1_keyblob.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classelftosb_1_1_keyblob-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">elftosb::Keyblob Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classelftosb_1_1_keyblob.html" title="Keyblob specification. ">Keyblob</a> specification.  
 <a href="classelftosb_1_1_keyblob.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_keyblob_8h_source.html">Keyblob.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for elftosb::Keyblob:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classelftosb_1_1_keyblob__coll__graph.svg" width="210" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a562e024204c1f92de96af3ac0d4387cf"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a562e024204c1f92de96af3ac0d4387cf">_encryption_constants</a> { <br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a562e024204c1f92de96af3ac0d4387cfa20446fcc423d9189f23634acba21b4e7">k_encryptBlockSize</a> = 16, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a562e024204c1f92de96af3ac0d4387cfa5ab8e7cc7dc5e8f8c9b86605dcd86c7f">k_qspiAlignlength</a>
<br />
 }<tr class="memdesc:a562e024204c1f92de96af3ac0d4387cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constants for encryption.  <a href="classelftosb_1_1_keyblob.html#a562e024204c1f92de96af3ac0d4387cf">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a562e024204c1f92de96af3ac0d4387cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43953025c808726663613a8df3cd48fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43953025c808726663613a8df3cd48fa"></a>
typedef std::vector&lt; <a class="el" href="classelftosb_1_1_option_context.html">OptionContext</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a43953025c808726663613a8df3cd48fa">option_vector_t</a></td></tr>
<tr class="memdesc:a43953025c808726663613a8df3cd48fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of options entries. <br /></td></tr>
<tr class="separator:a43953025c808726663613a8df3cd48fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0b0935de40ddba35a7ae41e925e3c211"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b0935de40ddba35a7ae41e925e3c211"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Keyblob</b> (uint32_t identifier)</td></tr>
<tr class="separator:a0b0935de40ddba35a7ae41e925e3c211"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07865326f5ed7e6d22bd7c8b8b45c29b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07865326f5ed7e6d22bd7c8b8b45c29b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setIdentifier</b> (uint32_t identifier)</td></tr>
<tr class="separator:a07865326f5ed7e6d22bd7c8b8b45c29b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a1e948b07cd56ffdb5079a71a7f0010"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a1e948b07cd56ffdb5079a71a7f0010"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>getIdentifier</b> () const </td></tr>
<tr class="separator:a8a1e948b07cd56ffdb5079a71a7f0010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b4bdcffe48ded76b074934350c2f01e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2b4bdcffe48ded76b074934350c2f01e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a2b4bdcffe48ded76b074934350c2f01e">addOptions</a> (<a class="el" href="classelftosb_1_1_option_context.html">OptionContext</a> *context)</td></tr>
<tr class="memdesc:a2b4bdcffe48ded76b074934350c2f01e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add options. <br /></td></tr>
<tr class="separator:a2b4bdcffe48ded76b074934350c2f01e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a084a0e1ad4121aa213c87c896a1d4877"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a084a0e1ad4121aa213c87c896a1d4877"></a>
<a class="el" href="classelftosb_1_1_keyblob.html#a43953025c808726663613a8df3cd48fa">option_vector_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a084a0e1ad4121aa213c87c896a1d4877">getOptions</a> ()</td></tr>
<tr class="memdesc:a084a0e1ad4121aa213c87c896a1d4877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return options vector. <br /></td></tr>
<tr class="separator:a084a0e1ad4121aa213c87c896a1d4877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c42bae2bff3cab60c8255066df8adb6"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a7c42bae2bff3cab60c8255066df8adb6">createWrappedKeyblobData</a> (uint8_t *kek, uint32_t *byteCount)</td></tr>
<tr class="memdesc:a7c42bae2bff3cab60c8255066df8adb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create and wrap keyblob data based on options.  <a href="#a7c42bae2bff3cab60c8255066df8adb6">More...</a><br /></td></tr>
<tr class="separator:a7c42bae2bff3cab60c8255066df8adb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd04a3c6e0b27e3314aa6202b7d9eb4d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#abd04a3c6e0b27e3314aa6202b7d9eb4d">encryptMatchingRange</a> (uint32_t start, uint32_t len, uint8_t *data)</td></tr>
<tr class="memdesc:abd04a3c6e0b27e3314aa6202b7d9eb4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypt for OTFAD if range is within a keyblob entry range.  <a href="#abd04a3c6e0b27e3314aa6202b7d9eb4d">More...</a><br /></td></tr>
<tr class="separator:abd04a3c6e0b27e3314aa6202b7d9eb4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a56b5a951fef5eb26e3eeeb8a3508c437"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a56b5a951fef5eb26e3eeeb8a3508c437"></a>
static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>getKekSizeBytes</b> ()</td></tr>
<tr class="separator:a56b5a951fef5eb26e3eeeb8a3508c437"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a13f55bc127100b1864ff50130921059b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059b">_keywrap_constants</a> { <br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059baf602e896e1f494f2b0bfc50c7cbf0fa4">kKeySizeBits</a> = 128, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba3885bbf44457d0b27dfe215e31784b08">kExpandedKekSizeInts</a> = 64, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba81a78f8537fb9d06dd8e3ea9b42c122c">kNumKeyBlobs</a> = 4, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059babc3816e26cdd2625d89e076747b5f812">kKeyBlobSizeBytes</a> = 64, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059baada6424f5b5573339d17bf1ae4217ca5">kOutputLineSize</a> = 16, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba9ceb5746661eb39de1b5e7bdd5c4248b">kRegionAddrMask</a> = (0x400 - 1), 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba0b880fa9654b0764635c13ba2b49ea71">kFlagMask</a> = 0x07, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba9d8bd8a554869cf7f8fe732759d91820">kKeyFlags</a> = 0x03, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba3ce9dea26424de982b3ebd309f364e8d">kAesKeySizeBytes</a> = 16, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba0cbb4db229b8174e9f48e6a86a21680f">kCtrSizeBytes</a> = 8, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059baf13f0c9b5909a104807e01b86fea9f85">kKekSizeBytes</a> = 16, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059baf45ce87a812dd6f790c8758929b6c672">kNumKeyChars</a> = 32, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba9716b32f5e5ebc12d2a7e732afc39801">kNumCtrChars</a> = 16, 
<br />
&#160;&#160;<a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059ba7115b8024c7b716b757c61a952664198">kCrc32SizeBytes</a> = 32
<br />
 }<tr class="memdesc:a13f55bc127100b1864ff50130921059b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Keywrap constants.  <a href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059b">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a13f55bc127100b1864ff50130921059b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a64950dd3240bf3b0588073602e79de25"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64950dd3240bf3b0588073602e79de25"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>populateKeyBlob</b> (<a class="el" href="structkeyblob__t.html">keyblob_t</a> *blob, uint32_t start, uint32_t end, const char *keyHex, const char *counterHex)</td></tr>
<tr class="separator:a64950dd3240bf3b0588073602e79de25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a146dca3172a81b33e31b1bacf2b8df05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a146dca3172a81b33e31b1bacf2b8df05"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>encrypt</b> (uint32_t length, uint8_t *data, <a class="el" href="class_a_e_s_key.html">AESKey</a>&lt; 128 &gt; *key, <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt; *counter)</td></tr>
<tr class="separator:a146dca3172a81b33e31b1bacf2b8df05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dc123cba452e208b9e4fed5eedca070"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4dc123cba452e208b9e4fed5eedca070"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>getOptionValues</b> (<a class="el" href="classelftosb_1_1_option_context.html">OptionContext</a> &amp;opt, const char **key, const char **ctr, uint32_t *start, uint32_t *end)</td></tr>
<tr class="separator:a4dc123cba452e208b9e4fed5eedca070"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a95e3313480b42e32841a26604e24426a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95e3313480b42e32841a26604e24426a"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#a95e3313480b42e32841a26604e24426a">m_id</a></td></tr>
<tr class="memdesc:a95e3313480b42e32841a26604e24426a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unique identifier. <br /></td></tr>
<tr class="separator:a95e3313480b42e32841a26604e24426a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa19beaa30c9b5c0b4101e5f7e8c82e95"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa19beaa30c9b5c0b4101e5f7e8c82e95"></a>
<a class="el" href="classelftosb_1_1_keyblob.html#a43953025c808726663613a8df3cd48fa">option_vector_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_keyblob.html#aa19beaa30c9b5c0b4101e5f7e8c82e95">m_options</a></td></tr>
<tr class="memdesc:aa19beaa30c9b5c0b4101e5f7e8c82e95"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of option entries. <br /></td></tr>
<tr class="separator:aa19beaa30c9b5c0b4101e5f7e8c82e95"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classelftosb_1_1_keyblob.html" title="Keyblob specification. ">Keyblob</a> specification. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a562e024204c1f92de96af3ac0d4387cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classelftosb_1_1_keyblob.html#a562e024204c1f92de96af3ac0d4387cf">elftosb::Keyblob::_encryption_constants</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constants for encryption. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a562e024204c1f92de96af3ac0d4387cfa20446fcc423d9189f23634acba21b4e7"></a>k_encryptBlockSize&#160;</td><td class="fielddoc">
<p>Block size for AES-128 encryption. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a562e024204c1f92de96af3ac0d4387cfa5ab8e7cc7dc5e8f8c9b86605dcd86c7f"></a>k_qspiAlignlength&#160;</td><td class="fielddoc">
<p>QSPI image alignment length, 512 is supposed to be the safe alignment level for any QSPI device this means that all QSPI images generated by this tool will be sizes of multiple 512 </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="a13f55bc127100b1864ff50130921059b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classelftosb_1_1_keyblob.html#a13f55bc127100b1864ff50130921059b">elftosb::Keyblob::_keywrap_constants</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Keywrap constants. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059baf602e896e1f494f2b0bfc50c7cbf0fa4"></a>kKeySizeBits&#160;</td><td class="fielddoc">
<p>AES-128. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba3885bbf44457d0b27dfe215e31784b08"></a>kExpandedKekSizeInts&#160;</td><td class="fielddoc">
<p>Expanded KeK size. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba81a78f8537fb9d06dd8e3ea9b42c122c"></a>kNumKeyBlobs&#160;</td><td class="fielddoc">
<p>Number of key blobs. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059babc3816e26cdd2625d89e076747b5f812"></a>kKeyBlobSizeBytes&#160;</td><td class="fielddoc">
<p>Key blob size in bytes. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059baada6424f5b5573339d17bf1ae4217ca5"></a>kOutputLineSize&#160;</td><td class="fielddoc">
<p>Number of bytes per output line. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba9ceb5746661eb39de1b5e7bdd5c4248b"></a>kRegionAddrMask&#160;</td><td class="fielddoc">
<p>Region addresses are modulo 1024. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba0b880fa9654b0764635c13ba2b49ea71"></a>kFlagMask&#160;</td><td class="fielddoc">
<p>Key flags mask. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba9d8bd8a554869cf7f8fe732759d91820"></a>kKeyFlags&#160;</td><td class="fielddoc">
<p>Default flags: RO=0, ADE=1, VLD=1. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba3ce9dea26424de982b3ebd309f364e8d"></a>kAesKeySizeBytes&#160;</td><td class="fielddoc">
<p>Number of bytes in AES-128 key. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba0cbb4db229b8174e9f48e6a86a21680f"></a>kCtrSizeBytes&#160;</td><td class="fielddoc">
<p>Number of bytes in Ctr. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059baf13f0c9b5909a104807e01b86fea9f85"></a>kKekSizeBytes&#160;</td><td class="fielddoc">
<p>Number of bytes in KeK. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059baf45ce87a812dd6f790c8758929b6c672"></a>kNumKeyChars&#160;</td><td class="fielddoc">
<p>Number of characters in key string. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba9716b32f5e5ebc12d2a7e732afc39801"></a>kNumCtrChars&#160;</td><td class="fielddoc">
<p>Number of characters in ctr string. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a13f55bc127100b1864ff50130921059ba7115b8024c7b716b757c61a952664198"></a>kCrc32SizeBytes&#160;</td><td class="fielddoc">
<p>Number of bytes covered by <a class="el" href="class_c_r_c32.html" title="CRC Checksum Calculation. ">CRC32</a>. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a7c42bae2bff3cab60c8255066df8adb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t * Keyblob::createWrappedKeyblobData </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>kek</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>byteCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create and wrap keyblob data based on options. </p>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">Pointer</td><td>to new wrapped data (caller must delete) </td></tr>
    <tr><td class="paramname">Number</td><td>of bytes in wrapped data </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abd04a3c6e0b27e3314aa6202b7d9eb4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Keyblob::encryptMatchingRange </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encrypt for OTFAD if range is within a keyblob entry range. </p>
<p>len must be a multiple of k_qspiAlignlength, which is also a multiple of k_encryptBlockSize.</p>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">True</td><td>if data was encrypted (range matched) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_keyblob_8h_source.html">Keyblob.h</a></li>
<li>Keyblob.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>elftosb</b></li><li class="navelem"><a class="el" href="classelftosb_1_1_keyblob.html">Keyblob</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:52 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
